<?php
$this->breadcrumbs=array(
	tt('Notification'),
);

$this->h1 = tt('Notification');
?>


<?php
echo CHtml::htmlButton(
		tt('Create Notification'), 
		array(
			'class'=>'button grey', 
			'onclick'=>'document.location.href="'.Yii::app()->createAbsoluteUrl(
					"/notification/admin/default/create").'"'
			)
);

$this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'notification-grid',
	'cssFile'=>Yii::app()->theme->baseUrl.'/css/tables.css',
	'itemsCssClass'=>'item-class',
	'pagerCssClass'=>'pager-class',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		array(
			'name' => 'subject_'.Yii::app()->language,
			'type' => 'raw',
			'value' => 'CHtml::link(CHtml::encode($data->subject_'.Yii::app()->language.'),array("/notification/admin/default/view","id" => $data->id))',
			'sortable' => false,
		),
		
		array(
			'class'=>'CButtonColumn',
			'template'=>'{view}{update}{delete}',
			'deleteConfirmation' => tt('Are you sure you want to delete this notification item?'),
			'viewButtonUrl' => "Yii::app()->createUrl('/notification/admin/default/view', array('id' => \$data->id))",
			'htmlOptions' => array('class'=>'button-column'),
			'buttons' => array(
				'view' => array(
					'imageUrl' => $url = Yii::app()->theme->baseUrl.'/images/icon_view.png',
				),
				'update' => array(
					'imageUrl' => $url = Yii::app()->theme->baseUrl.'/images/icon_edit.png',
				),
				'delete' => array(
					'imageUrl' => $url = Yii::app()->theme->baseUrl.'/images/icon_delete.png',
				),
			),
		),
	),
));
?>

